function e = convertAngleAxis2UnitQuaternion (theta, vec)
    
    x = vec(1);
    y = vec(2);
    z = vec(3);

    e0 = cos(0.5 * theta);
    e1 = x * sin(0.5 * theta);
    e2 = y * sin(0.5 * theta);
    e3 = z * sin(0.5 * theta);
    
    e = [e0 e1 e2 e3]';